package com.dpj.mapper;

import com.dpj.pojo.Brand;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface BrandMapper2 {

    @Select("select * from tb_brand")
    public List<Brand> selectAll() ;

    @Insert("insert into tb_brand values(null,#{brandName},#{companyName},#{ordered},#{description},#{status})")
    int addOneBrnad(Brand brand);

    @Update("update tb_brand set brand_name=#{brandName},company_name=#{companyName},ordered=#{ordered},description=#{description},status=#{status} where id=#{id}")
    void updateById(Brand brand);

    @Delete("delete from tb_brand where id=#{i}")
    void deleteById(int i);

    void deleteByIds(List list);

    List<Brand> selectByCondition(Brand brand);
}
